package com.itqf.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.itqf.json.MySerializer;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2020/10/9
 * @Time: 下午4:40
 */
@Data
public class User {

    //jackson
    //fastjson
    @JSONField(name = "userId")
    private  int id;
    @JSONField(name = "username")
    private  String name;
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    @JSONField(format = "yyyy-MM-dd hh:mm:ss")
    private Date birthdate;//日期格式

    //为null会忽略
    private List<String> hobby;//复选框

    //private  String [] hobby;
    private int  version;//忽略该字段

    @JSONField(serializeUsing = MySerializer.class)
    private  double salary;



}
